3.12.60 \(\int \frac {a+b \arctan (c x)}{x (d+e x^2)^2} \, dx\) [1160]

3.12.60.1 Optimal result
3.12.60.2 Mathematica [A] (verified)
3.12.60.3 Rubi [A] (verified)
3.12.60.4 Maple [C] (warning: unable to verify)
3.12.60.5 Fricas [F]
3.12.60.6 Sympy [F(-1)]
3.12.60.7 Maxima [F]
3.12.60.8 Giac [F]
3.12.60.9 Mupad [F(-1)]

3.12.60.1 Optimal result

Integrand size = 21, antiderivative size = 443 \[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=-\frac {b c^2 \arctan (c x)}{2 d \left (c^2 d-e\right )}+\frac {a+b \arctan (c x)}{2 d \left (d+e x^2\right )}+\frac {b c \sqrt {e} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \left (c^2 d-e\right )}+\frac {a \log (x)}{d^2}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1-i c x}\right )}{d^2}-\frac {(a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}-\frac {(a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 d^2}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^2}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^2}-\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{2 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2} \]

output
-1/2*b*c^2*arctan(c*x)/d/(c^2*d-e)+1/2*(a+b*arctan(c*x))/d/(e*x^2+d)+a*ln( 
x)/d^2+(a+b*arctan(c*x))*ln(2/(1-I*c*x))/d^2-1/2*(a+b*arctan(c*x))*ln(2*c* 
((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^2-1/2*(a+b*ar 
ctan(c*x))*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2) 
))/d^2+1/2*I*b*polylog(2,-I*c*x)/d^2-1/2*I*b*polylog(2,I*c*x)/d^2-1/2*I*b* 
polylog(2,1-2/(1-I*c*x))/d^2+1/4*I*b*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2) 
)/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/d^2+1/4*I*b*polylog(2,1-2*c*((-d)^(1 
/2)+x*e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/d^2+1/2*b*c*arctan(x*e^ 
(1/2)/d^(1/2))*e^(1/2)/d^(3/2)/(c^2*d-e)
 
3.12.60.2 Mathematica [A] (verified)

Time = 5.09 (sec) , antiderivative size = 590, normalized size of antiderivative = 1.33 \[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\frac {2 a \left (\frac {d}{d+e x^2}+2 \log (x)-\log \left (d+e x^2\right )\right )+b \left (-\frac {2 c^2 d \arctan (c x)}{c^2 d-e}+\frac {2 d \arctan (c x)}{d+e x^2}+\frac {2 c \sqrt {d} \sqrt {e} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{c^2 d-e}+4 \arctan (c x) \log (x)-2 \arctan (c x) \log \left (-\frac {i \sqrt {d}}{\sqrt {e}}+x\right )-2 \arctan (c x) \log \left (\frac {i \sqrt {d}}{\sqrt {e}}+x\right )-i \log \left (-\frac {i \sqrt {d}}{\sqrt {e}}+x\right ) \log \left (\frac {\sqrt {e} (-1-i c x)}{c \sqrt {d}-\sqrt {e}}\right )-2 i \log (x) \log (1-i c x)+i \log \left (-\frac {i \sqrt {d}}{\sqrt {e}}+x\right ) \log \left (\frac {\sqrt {e} (1-i c x)}{c \sqrt {d}+\sqrt {e}}\right )+i \log \left (\frac {i \sqrt {d}}{\sqrt {e}}+x\right ) \log \left (\frac {\sqrt {e} (-1+i c x)}{c \sqrt {d}-\sqrt {e}}\right )+2 i \log (x) \log (1+i c x)-i \log \left (\frac {i \sqrt {d}}{\sqrt {e}}+x\right ) \log \left (\frac {\sqrt {e} (1+i c x)}{c \sqrt {d}+\sqrt {e}}\right )+2 i \operatorname {PolyLog}(2,-i c x)-2 i \operatorname {PolyLog}(2,i c x)+i \operatorname {PolyLog}\left (2,\frac {c \left (\sqrt {d}-i \sqrt {e} x\right )}{c \sqrt {d}-\sqrt {e}}\right )-i \operatorname {PolyLog}\left (2,\frac {c \left (\sqrt {d}-i \sqrt {e} x\right )}{c \sqrt {d}+\sqrt {e}}\right )-i \operatorname {PolyLog}\left (2,\frac {c \left (\sqrt {d}+i \sqrt {e} x\right )}{c \sqrt {d}-\sqrt {e}}\right )+i \operatorname {PolyLog}\left (2,\frac {c \left (\sqrt {d}+i \sqrt {e} x\right )}{c \sqrt {d}+\sqrt {e}}\right )\right )}{4 d^2} \]

input
Integrate[(a + b*ArcTan[c*x])/(x*(d + e*x^2)^2),x]
 
output
(2*a*(d/(d + e*x^2) + 2*Log[x] - Log[d + e*x^2]) + b*((-2*c^2*d*ArcTan[c*x 
])/(c^2*d - e) + (2*d*ArcTan[c*x])/(d + e*x^2) + (2*c*Sqrt[d]*Sqrt[e]*ArcT 
an[(Sqrt[e]*x)/Sqrt[d]])/(c^2*d - e) + 4*ArcTan[c*x]*Log[x] - 2*ArcTan[c*x 
]*Log[((-I)*Sqrt[d])/Sqrt[e] + x] - 2*ArcTan[c*x]*Log[(I*Sqrt[d])/Sqrt[e] 
+ x] - I*Log[((-I)*Sqrt[d])/Sqrt[e] + x]*Log[(Sqrt[e]*(-1 - I*c*x))/(c*Sqr 
t[d] - Sqrt[e])] - (2*I)*Log[x]*Log[1 - I*c*x] + I*Log[((-I)*Sqrt[d])/Sqrt 
[e] + x]*Log[(Sqrt[e]*(1 - I*c*x))/(c*Sqrt[d] + Sqrt[e])] + I*Log[(I*Sqrt[ 
d])/Sqrt[e] + x]*Log[(Sqrt[e]*(-1 + I*c*x))/(c*Sqrt[d] - Sqrt[e])] + (2*I) 
*Log[x]*Log[1 + I*c*x] - I*Log[(I*Sqrt[d])/Sqrt[e] + x]*Log[(Sqrt[e]*(1 + 
I*c*x))/(c*Sqrt[d] + Sqrt[e])] + (2*I)*PolyLog[2, (-I)*c*x] - (2*I)*PolyLo 
g[2, I*c*x] + I*PolyLog[2, (c*(Sqrt[d] - I*Sqrt[e]*x))/(c*Sqrt[d] - Sqrt[e 
])] - I*PolyLog[2, (c*(Sqrt[d] - I*Sqrt[e]*x))/(c*Sqrt[d] + Sqrt[e])] - I* 
PolyLog[2, (c*(Sqrt[d] + I*Sqrt[e]*x))/(c*Sqrt[d] - Sqrt[e])] + I*PolyLog[ 
2, (c*(Sqrt[d] + I*Sqrt[e]*x))/(c*Sqrt[d] + Sqrt[e])]))/(4*d^2)
 
3.12.60.3 Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 443, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {5515, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx\)

\(\Big \downarrow \) 5515

\(\displaystyle \int \left (-\frac {e x (a+b \arctan (c x))}{d^2 \left (d+e x^2\right )}+\frac {a+b \arctan (c x)}{d^2 x}-\frac {e x (a+b \arctan (c x))}{d \left (d+e x^2\right )^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {(a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 d^2}-\frac {(a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 d^2}+\frac {\log \left (\frac {2}{1-i c x}\right ) (a+b \arctan (c x))}{d^2}+\frac {a+b \arctan (c x)}{2 d \left (d+e x^2\right )}+\frac {a \log (x)}{d^2}+\frac {b c \sqrt {e} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2} \left (c^2 d-e\right )}-\frac {b c^2 \arctan (c x)}{2 d \left (c^2 d-e\right )}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 d^2}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^2}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^2}-\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{2 d^2}\)

input
Int[(a + b*ArcTan[c*x])/(x*(d + e*x^2)^2),x]
 
output
-1/2*(b*c^2*ArcTan[c*x])/(d*(c^2*d - e)) + (a + b*ArcTan[c*x])/(2*d*(d + e 
*x^2)) + (b*c*Sqrt[e]*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(2*d^(3/2)*(c^2*d - e)) 
 + (a*Log[x])/d^2 + ((a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/d^2 - ((a + b 
*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*( 
1 - I*c*x))])/(2*d^2) - ((a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] + Sqrt[e]* 
x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*d^2) + ((I/2)*b*PolyLog[2, 
 (-I)*c*x])/d^2 - ((I/2)*b*PolyLog[2, I*c*x])/d^2 - ((I/2)*b*PolyLog[2, 1 
- 2/(1 - I*c*x)])/d^2 + ((I/4)*b*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x 
))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/d^2 + ((I/4)*b*PolyLog[2, 1 - 
(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/d^2
 

3.12.60.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5515
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_)^2)^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*ArcTan[c*x] 
)^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d 
, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || 
 IntegerQ[m])
 
3.12.60.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.48 (sec) , antiderivative size = 808, normalized size of antiderivative = 1.82

method result size
parts \(\text {Expression too large to display}\) \(808\)
derivativedivides \(\text {Expression too large to display}\) \(816\)
default \(\text {Expression too large to display}\) \(816\)
risch \(-\frac {i b \operatorname {dilog}\left (\frac {c \sqrt {e d}+\left (-i c x +1\right ) e -e}{c \sqrt {e d}-e}\right )}{4 d^{2}}-\frac {i b \,c^{4} e \ln \left (i c x +1\right ) x^{2}}{4 d \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}+\frac {i b \operatorname {dilog}\left (\frac {c \sqrt {e d}-\left (i c x +1\right ) e +e}{c \sqrt {e d}+e}\right )}{4 d^{2}}+\frac {i b \operatorname {dilog}\left (i c x +1\right )}{2 d^{2}}-\frac {i b \operatorname {dilog}\left (\frac {c \sqrt {e d}-\left (-i c x +1\right ) e +e}{c \sqrt {e d}+e}\right )}{4 d^{2}}+\frac {i b \operatorname {dilog}\left (\frac {c \sqrt {e d}+\left (i c x +1\right ) e -e}{c \sqrt {e d}-e}\right )}{4 d^{2}}-\frac {i b \,c^{2} e \ln \left (i c x +1\right )}{4 d \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}+\frac {i b \ln \left (i c x +1\right ) \ln \left (\frac {c \sqrt {e d}+\left (i c x +1\right ) e -e}{c \sqrt {e d}-e}\right )}{4 d^{2}}-\frac {i b c e \,\operatorname {arctanh}\left (\frac {2 \left (i c x +1\right ) e -2 e}{2 c \sqrt {e d}}\right )}{4 d \left (c^{2} d -e \right ) \sqrt {e d}}+\frac {a \ln \left (-i c x \right )}{d^{2}}-\frac {a \,c^{2}}{2 d \left (-e \,c^{2} x^{2}-c^{2} d \right )}-\frac {a \ln \left (\left (-i c x +1\right )^{2} e -c^{2} d -2 \left (-i c x +1\right ) e +e \right )}{2 d^{2}}-\frac {i b \ln \left (-i c x +1\right ) \ln \left (\frac {c \sqrt {e d}+\left (-i c x +1\right ) e -e}{c \sqrt {e d}-e}\right )}{4 d^{2}}+\frac {i c^{2} b e \ln \left (-i c x +1\right )}{4 d \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}+\frac {i c^{4} b e \ln \left (-i c x +1\right ) x^{2}}{4 d \left (c^{2} d -e \right ) \left (-e \,c^{2} x^{2}-c^{2} d \right )}-\frac {i b \,c^{2} \ln \left (\left (i c x +1\right )^{2} e -c^{2} d -2 \left (i c x +1\right ) e +e \right )}{8 d \left (c^{2} d -e \right )}-\frac {i b \operatorname {dilog}\left (-i c x +1\right )}{2 d^{2}}-\frac {i b \ln \left (-i c x +1\right ) \ln \left (\frac {c \sqrt {e d}-\left (-i c x +1\right ) e +e}{c \sqrt {e d}+e}\right )}{4 d^{2}}+\frac {i b \ln \left (i c x +1\right ) \ln \left (\frac {c \sqrt {e d}-\left (i c x +1\right ) e +e}{c \sqrt {e d}+e}\right )}{4 d^{2}}+\frac {i c b e \,\operatorname {arctanh}\left (\frac {2 \left (-i c x +1\right ) e -2 e}{2 c \sqrt {e d}}\right )}{4 d \left (c^{2} d -e \right ) \sqrt {e d}}+\frac {i c^{2} b \ln \left (\left (-i c x +1\right )^{2} e -c^{2} d -2 \left (-i c x +1\right ) e +e \right )}{8 d \left (c^{2} d -e \right )}\) \(862\)

input
int((a+b*arctan(c*x))/x/(e*x^2+d)^2,x,method=_RETURNVERBOSE)
 
output
a*ln(x)/d^2+1/2*a/d/(e*x^2+d)-1/2*a/d^2*ln(e*x^2+d)+b*(arctan(c*x)/d^2*ln( 
c*x)+1/2*c^2*arctan(c*x)/d/(c^2*e*x^2+c^2*d)-1/2*arctan(c*x)/d^2*ln(c^2*e* 
x^2+c^2*d)-1/2*c^4*(1/d/c^2/(c^2*d-e)*arctan(c*x)-1/d/c^3*e/(c^2*d-e)/(e*d 
)^(1/2)*arctan(e*x/(e*d)^(1/2))-I/c^4/d^2*ln(c*x)*ln(1+I*c*x)+I/c^4/d^2*ln 
(c*x)*ln(1-I*c*x)-I/c^4/d^2*dilog(1+I*c*x)+I/c^4/d^2*dilog(1-I*c*x)-1/d^2/ 
c^4*(-1/2*I*(ln(c*x-I)*ln(c^2*e*x^2+c^2*d)-2*e*(1/2*ln(c*x-I)*(ln((RootOf( 
e*_Z^2+2*I*e*_Z+c^2*d-e,index=1)-c*x+I)/RootOf(e*_Z^2+2*I*e*_Z+c^2*d-e,ind 
ex=1))+ln((RootOf(e*_Z^2+2*I*e*_Z+c^2*d-e,index=2)-c*x+I)/RootOf(e*_Z^2+2* 
I*e*_Z+c^2*d-e,index=2)))/e+1/2*(dilog((RootOf(e*_Z^2+2*I*e*_Z+c^2*d-e,ind 
ex=1)-c*x+I)/RootOf(e*_Z^2+2*I*e*_Z+c^2*d-e,index=1))+dilog((RootOf(e*_Z^2 
+2*I*e*_Z+c^2*d-e,index=2)-c*x+I)/RootOf(e*_Z^2+2*I*e*_Z+c^2*d-e,index=2)) 
)/e))+1/2*I*(ln(I+c*x)*ln(c^2*e*x^2+c^2*d)-2*e*(1/2*ln(I+c*x)*(ln((RootOf( 
e*_Z^2-2*I*e*_Z+c^2*d-e,index=1)-c*x-I)/RootOf(e*_Z^2-2*I*e*_Z+c^2*d-e,ind 
ex=1))+ln((RootOf(e*_Z^2-2*I*e*_Z+c^2*d-e,index=2)-c*x-I)/RootOf(e*_Z^2-2* 
I*e*_Z+c^2*d-e,index=2)))/e+1/2*(dilog((RootOf(e*_Z^2-2*I*e*_Z+c^2*d-e,ind 
ex=1)-c*x-I)/RootOf(e*_Z^2-2*I*e*_Z+c^2*d-e,index=1))+dilog((RootOf(e*_Z^2 
-2*I*e*_Z+c^2*d-e,index=2)-c*x-I)/RootOf(e*_Z^2-2*I*e*_Z+c^2*d-e,index=2)) 
)/e)))))
 
3.12.60.5 Fricas [F]

\[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

input
integrate((a+b*arctan(c*x))/x/(e*x^2+d)^2,x, algorithm="fricas")
 
output
integral((b*arctan(c*x) + a)/(e^2*x^5 + 2*d*e*x^3 + d^2*x), x)
 
3.12.60.6 Sympy [F(-1)]

Timed out. \[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\text {Timed out} \]

input
integrate((a+b*atan(c*x))/x/(e*x**2+d)**2,x)
 
output
Timed out
 
3.12.60.7 Maxima [F]

\[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

input
integrate((a+b*arctan(c*x))/x/(e*x^2+d)^2,x, algorithm="maxima")
 
output
1/2*a*(1/(d*e*x^2 + d^2) - log(e*x^2 + d)/d^2 + 2*log(x)/d^2) + 2*b*integr 
ate(1/2*arctan(c*x)/(e^2*x^5 + 2*d*e*x^3 + d^2*x), x)
 
3.12.60.8 Giac [F]

\[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{{\left (e x^{2} + d\right )}^{2} x} \,d x } \]

input
integrate((a+b*arctan(c*x))/x/(e*x^2+d)^2,x, algorithm="giac")
 
output
sage0*x
 
3.12.60.9 Mupad [F(-1)]

Timed out. \[ \int \frac {a+b \arctan (c x)}{x \left (d+e x^2\right )^2} \, dx=\int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{x\,{\left (e\,x^2+d\right )}^2} \,d x \]

input
int((a + b*atan(c*x))/(x*(d + e*x^2)^2),x)
 
output
int((a + b*atan(c*x))/(x*(d + e*x^2)^2), x)